package com.tuozixuan;

import java.math.BigDecimal;
import java.math.BigInteger;

import com.googlecode.aviator.AviatorEvaluator;

public class AviatorSimpleExample {

	public static void main(String[] args) {
		Long result = (Long)AviatorEvaluator.execute("1+2+3");
		System.out.println(result);
		
		Double result1 = (Double)AviatorEvaluator.execute("1.1+2.1+3.1");
		System.out.println(result1);
		
		BigInteger result2 = (BigInteger)AviatorEvaluator.execute("1N+2N+3N");
		System.out.println(result2);
		
		BigDecimal result3 = (BigDecimal)AviatorEvaluator.execute("1.1M+2.1M+3.1M");
		System.out.println(result3);
	}

}
